<template>
	<view>
		<u-popup v-model="show" mode="center" borderRadius="20" width="700" :maskCloseAble="false" @close="$navBack()"
			closeable zIndex="998">
			<view class="p40">
				<view class="tc fs32 fw-w">申请达人</view>

				<u-form labelWidth="120">
					<u-form-item label="姓名">
						<u-input v-model="form.name" placeholder="请输入姓名"></u-input>
					</u-form-item>
					<u-form-item label="手机号">
						<u-input v-model="form.mobile" type="number" maxlength="11" placeholder="请输入手机号"></u-input>
					</u-form-item>
					<view class="h40"></view>
					<u-button type="warning" @click="submit">提交</u-button>
				</u-form>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				form: {
					name: "",
					mobile: ''
				}
			};
		},
		onLoad() {
			this.getData()
		},
		methods: {
			submit() {
				this.$request('/member/team/applyPromoter', this.form).then(res => {
						this.$msg(res.msg)
						this.getData()
				})
			},
			getData() {
				this.$request('/member/team/promoterInfo').then(res => {
					if (!res.data) this.show = true
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
